package com.hao.epidemic_prevention.dao;

import com.hao.epidemic_prevention.bean.QueryRangeCondition;
import com.hao.epidemic_prevention.bean.QueryTodayCondition;
import com.hao.epidemic_prevention.bean.User;
import com.hao.epidemic_prevention.bean.UserRecord;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    public User getUser(User user);
    public Integer addUser(User user);

    public Integer getUserNum(QueryRangeCondition condition);
    public Integer getUserRecordNumToday();
    public Integer addUserRecord(UserRecord userRecord);
    public Integer isReportToday(String roleId);
    public Integer isFreeze(String roleId);

    // 分页 (移除)
    public List<UserRecord> getUserRecordToday10(QueryTodayCondition condition);

    // 获取今天记录
    public List<UserRecord> getUserRecordToday(QueryTodayCondition condition);
    public List<UserRecord> getUserRecordTodayWithTAsc(QueryTodayCondition condition);
    public List<UserRecord> getUserRecordTodayWithTDesc(QueryTodayCondition condition);

    // 获取未打卡名单
    public List<User> getNotReportUserToday(QueryRangeCondition condition);

    // 获取范围记录
    public List<UserRecord> getUserRecordRangeWithDAsc(QueryRangeCondition condition);
    public List<UserRecord> getUserRecordRangeWithDDesc(QueryRangeCondition condition);
    public List<UserRecord> getUserRecordRangeWithTAsc(QueryRangeCondition condition);
    public List<UserRecord> getUserRecordRangeWithTDesc(QueryRangeCondition condition);

    // 获取全部User
    public List<User> getAllUser();

    // 获取数据统计


    // 冻结、解冻账号
    public Integer freezeUser(String userId);
    public Integer unfreezeUser(String userId);
}
